/**
 * Created by TEANA on 2018/1/3.
 */
module.exports = ngModule => {
  ngModule.filter('contentTime', function ($filter) {
    return function (showTime) {
      let re = /^[0-9]+.?[0-9]*$/;// 数字正则表达式
      if (!re.test(showTime)) {
        let tempDate = showTime.replace(/-/g, '/');
        showTime = new Date(tempDate);
      }
      return $filter('date')(showTime, 'yyyy-MM-dd HH:mm');
    };
  });
};
